package com.seb.cc.gtou.db;

import android.content.ContentValues;
import android.net.Uri;
import android.provider.BaseColumns;


import com.seb.cc.gtou.provider.GTProvider;

public final class GTSejLieuDB {
	public static final String SEJLIEU_NAME = "sejourlieu";
	public static final String SEJLIEU_TABLE_NAME = "sejlieu";

	public static final String SEJLIEU_CREATE_TABLE = "CREATE TABLE "
			+ SEJLIEU_TABLE_NAME + " (" + GTSejLieuTable.SEJ_ID
			+ " INTEGRER," + GTSejLieuTable.LIEU_ID + " INTEGER " 
			+ ");";
	

	public static final String[] SEJPART_PROJECTION = new String[] {
			GTSejLieuDB.GTSejLieuTable.SEJ_ID,
			GTSejLieuDB.GTSejLieuTable.LIEU_ID };
	
	public static boolean valide(ContentValues values) {
		boolean result = (values
				.containsKey(GTSejLieuDB.GTSejLieuTable.SEJ_ID)
				&& values.containsKey(GTSejLieuDB.GTSejLieuTable.LIEU_ID)) || values.equals(null);

		return result;
	} // valide
	
	private GTSejLieuDB() {
	} // GTSejPartDB

	
	
	
	public static final class GTSejLieuTable implements BaseColumns {

		private GTSejLieuTable() {
		} // GTSejPartTable

		/**
		 * The content:// style URL for this table
		 */
		public static final Uri CONTENT_URI = Uri.parse("content://"
				+ GTProvider.AUTHORITY + "/" + SEJLIEU_NAME);

		/**
		 * The MIME type of {@link #CONTENT_URI} providing a directory of notes.
		 */
		public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.gtou.sejlieu";

		/**
		 * The MIME type of a {@link #CONTENT_URI} sub-directory of a single
		 * sejour.
		 */
		public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.gtou.sejlieu";


		/**
		 * ID du sejour
		 * <P>
		 * Type: INTEGER
		 * </P>
		 */
		public static final String SEJ_ID = "Sejour_ID";

		/**
		 * ID du Lieu
		 * <P>
		 * Type: INTEGER
		 * </P>
		 */
		public static final String LIEU_ID = "LIEU_ID";


	} // static final class GTSejLieuDB
}
